package com.shundr.auth.activity;

import java.net.URL;

import android.graphics.BitmapFactory;
import android.os.Bundle;

import com.nostra13.universalimageloader.core.ImageLoader;
import com.shundr.auth.channel.R;
import com.shundr.auth.base.BaseActivity;
import com.shundr.auth.common.view.ZoomImageView;

public class PreviewActivity extends BaseActivity {

	private ImageLoader mImageLoader;

	private String mUrl = "";

	private ZoomImageView imgv;

	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		try {
			setContentView(R.layout.activity_preview_image);
			mUrl = getIntent().getStringExtra("url");
			this.mImageLoader = ImageLoader.getInstance();
			imgv = (ZoomImageView) findViewById(R.id.iv_image);
			URL url = new URL(mUrl);
			imgv.setImage(BitmapFactory.decodeStream(url.openStream()));
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
